package controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class DemoController {
    @RequestMapping("/hello")
    private String hello(){
        System.out.println("==========");

        // 真正的返回值：http://localhost:8080/springmvcOnClass/WEB-INF/pages/hello.jsp
        //http://localhost:8080/springmvcOnClass+prefix+hello+suffix    前后缀在spring-mvc.xml里面配置的
        return "hello";
    }

    @GetMapping(value="/firstController")
    public void sayHello(){
        System.out.println("hello world");
    }
}
